package helper;

import java.util.Calendar;

import au.gov.xml.edais.bs.receiptacknowledgementsignal_msg_2_3_0r2.ReceiptAcknowledgementSignal;
import au.gov.xml.edais.bs.receiptacknowledgementsignal_msg_2_3_0r2.ReceiptAcknowledgementSignalType;
import au.gov.xml.edais.core.msg_data_2_3_0r2.BusinessScope;
import au.gov.xml.edais.core.msg_data_2_3_0r2.DocumentIdentification;
import au.gov.xml.edais.core.msg_data_2_3_0r2.Partner;
import au.gov.xml.edais.core.msg_data_2_3_0r2.ReceiptAcknowledgement;
import au.gov.xml.edais.core.msg_data_2_3_0r2.StandardBusinessMessageHeader;
import au.gov.xml.edais.dt.qdt.cdt_type_2_3_0r2.CodeType;
import au.gov.xml.edais.dt.qdt.cdt_type_2_3_0r2.DateTimeType;
import au.gov.xml.edais.dt.qdt.cdt_type_2_3_0r2.IdentifierType;
import au.gov.xml.edais.dt.qdt.cdt_type_2_3_0r2.TextType;
import au.gov.xml.edais.dt.qdt.msg_type_2_3_0r2.BusinessScope_CodeType;
import au.gov.xml.edais.dt.qdt.msg_type_2_3_0r2.Standard_CodeType;

public class ReceiptAcknowledgementSignalHelper {

		public static ReceiptAcknowledgementSignal getReceiptAcknowledgementSignal()
		{
          	 ReceiptAcknowledgementSignal receiptAcknowledgementSignal = new ReceiptAcknowledgementSignal();
           	 ReceiptAcknowledgementSignalType receiptAcknowledgementSignalType = new ReceiptAcknowledgementSignalType();
           	 ReceiptAcknowledgement receiptAcknowledgement = new ReceiptAcknowledgement();
           	 DateTimeType dateTimeType = new DateTimeType();
           	 dateTimeType.setDateTime(Calendar.getInstance());
           	 receiptAcknowledgement.setTimestamp(dateTimeType);
           	 receiptAcknowledgementSignalType.setReceiptAcknowledgement(receiptAcknowledgement);
           	 receiptAcknowledgementSignal.setReceiptAcknowledgementSignal(receiptAcknowledgementSignalType);
           	 StandardBusinessMessageHeader standardBusinessMessageHeader = new StandardBusinessMessageHeader();
           	 BusinessScope businessScope = new BusinessScope();
           	 businessScope.setType(BusinessScope_CodeType.BusinessCollaboration);
           	 BusinessScope[] businessScopeArray = new BusinessScope[1];
           	 businessScopeArray[0] = businessScope;
           	 standardBusinessMessageHeader.setBusinessScope(businessScopeArray);
           	 DocumentIdentification documentIdentification = new DocumentIdentification();
           	 documentIdentification.setCreationDateTime(dateTimeType);
           	 IdentifierType identifierType = new IdentifierType();
           	 identifierType.setIdentifier("BLAH");
           	 documentIdentification.setInstanceID(identifierType);
           	 documentIdentification.setStandard(Standard_CodeType.eDAIS);
           	 CodeType codeType = new CodeType();
           	 codeType.setCode("BLAH");
           	 documentIdentification.setType(codeType);
           	 TextType textType = new TextType();
           	 textType.setText("BLAH");
           	 documentIdentification.setTypeVersion(textType);
           	 standardBusinessMessageHeader.setDocumentIdentification(documentIdentification);
           	 Partner partner = new Partner();
           	 partner.setAuthority(textType);
           	 partner.setID(identifierType);
           	 partner.setProcessRole(codeType);
           	 standardBusinessMessageHeader.setReceiverPartner(partner);
           	 standardBusinessMessageHeader.setSenderPartner(partner);
           	 standardBusinessMessageHeader.setVersion(identifierType);
           	 receiptAcknowledgementSignalType.setStandardBusinessMessageHeader(standardBusinessMessageHeader);
           	 return receiptAcknowledgementSignal;
		}
}
